<?php include "includes/comunes.php";
$titulo="Edictos";
$where="";

if($_POST['dni'])
  $where.= " and EdictoDni=".strtoupper(trim($_POST['dni']));
  
if($_POST['nro'])
  $where.= " and EdictoNumero='".strtoupper(trim($_POST['nro']))."'";
  
if($_POST['ano'])
  $where.= " and EdictoAno=".strtoupper(trim($_POST['ano']));
  
if($_POST['nom'])
  $where.= " and EdictoNombre like '%".strtoupper(trim($_POST['nom']))."%'";  

$tabla="edictos";
$condicion=" EdictoPublicar=1 ".$where;
$orden=" order by EdictoNumero desc,EdictoAno desc limit 0,40";
$res=cons_sql($tabla,$condicion,$orden);

//seteo titulo de la pagina

 ?>
<html class="no-js"> <!--<![endif]-->
<head>
      <?php include "includes/metas.php";?>
    </head>
<body>

 <?php include "includes/nav.php";?>
 <?php include "includes/header.php";?>    
 <?php include "includes/menu.php";?>  

<div class="container">
<div class="row">
</div>
</div>

<div class="space"></div>
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="art"><h3><div class="destaca">Edictos</div></h3>
<div class="row">
<div class="col-md-8 col-sm-8">

 <a href="edictos.php">Ver Todas</a>
 <br>
 El INSSSEP cita por dos (2) días a quienes se crean con derecho a la Pensión de las personas que se mencionan a continuación, bajo apercibimiento de ley:
 <br>
 <br>

</div>

</div>
<div class="row">
<div class="col-md-8 col-sm-8">
<?php while($reg=mysql_fetch_array($res)):?>
<h4><b><?php echo utf8_encode($reg['EdictoNombre']).' DNI: '.utf8_encode($reg['EdictoDni'])?> </b> <span class="label label-primary"> <?php echo 'Nro: '.strtoupper(utf8_encode($reg['EdictoNumero'])).'-'.strtoupper(utf8_encode($reg['EdictoAno']))?></span></h4>
 <?php echo utf8_encode($reg['EdictoContenido'])?>
<hr>
<?php endwhile?>

</div>
<div class="col-md-4 col-sm-4">
<form role="search" method="POST" action="edictos.php">

<div class="form-group">
    <input type="text" class="form-control" name="dni" placeholder="Nro. DNI" ><br>
	 <input type="text" class="form-control" name="nom" placeholder="Nombre/Apellido" ><br>
	<input type="text" class="form-control" name="nro" placeholder="Numero" style="width:40%"> <br>
	<input type="text" class="form-control" name="ano" placeholder="Año" style="width:60%"> 
 </div>
 <button type="submit" class="btn btn-default">Buscar</button>
  
</form>





</div>
 </div>


<a href="index.php"><button type="button" class="btn btn-default btn-sm">Inicio</button></a></div>
</div></div>
<div class="linea"></div>
<?php include "includes/menuInferior.php";?> 
<div class="linea"></div>
<?php include "includes/footer.php";?> 

 <?php include "includes/js.php";?>  
    </body>
</html>
